﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestTypeList.aspx.cs" Inherits="BOH.DataManagement.TestTypeList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../style/css.css" type="text/css" rel="Stylesheet" />

    <script src="../js/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../js/common.js" type="text/javascript"></script>

</head>
    <script>
        $(document).ready(function() {
            $("#headercheck").click(selectAll);
            $(".itemCheckBox").click(selectItem);
        });
    </script>
<body>
    <form id="form1" runat="server">
    <div id="divNavigation">
        当前位置:<a href="OverView.aspx" target="frameControl">后台数据管理</a> >> 考试科目管理
    </div>
    <div id="bodyDiv">
        <div id="divSearch">
            <a href="TestTypeAdd.aspx" target="frameControl">添加考试科目</a> &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="butDelete" runat="server" onclick="butDelete_Click">删除</asp:LinkButton>
        </div>
        <div id="divGrid">
            <asp:HiddenField ID="hiddenSelected" runat="server" />
            <asp:GridView ID="gvTestTypeList" runat="server" AutoGenerateColumns="False" Width="98%"
                CssClass="Grid" AllowPaging="True" PageSize="15" 
                onrowediting="gvTestTypeList_RowEditing" 
                onrowdatabound="gvTestTypeList_RowDataBound" 
                onrowcancelingedit="gvTestTypeList_RowCancelingEdit" 
                onrowupdating="gvTestTypeList_RowUpdating">
                <PagerSettings Mode="NumericFirstLast" />
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <input id="headercheck" type="checkbox" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <input id="itemChk_<%#Eval("TestTypeID") %>" type="checkbox" value="<%#Eval("TestTypeID") %>"
                                class="itemCheckBox" />
                        </ItemTemplate>
                        <HeaderStyle Width="30px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="科目编号">
                        <ItemTemplate>
                            <asp:Label ID="labTestTypeID" Text='<%#Eval("TestTypeID") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="科目名称">
                        <ItemTemplate>
                            <asp:Label ID="labTestTypeName" Text='<%#Eval("TestTypeName") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="txtTypeName" runat="server" Width="80"  Text='<%#Eval("TestTypeName") %>'/>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <asp:Label ID="labUserName" Text='<%#getStatus(Eval("status").ToString()) %>' runat="server"></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:HiddenField ID="hideStatus" runat="server" Value='<%#Eval("status") %>' />
                            <asp:DropDownList ID="drpStatus" runat="server">
                                <asp:ListItem Value="A">激活</asp:ListItem>
                                <asp:ListItem Value="D">未激活</asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField HeaderText="修改" CancelText="取消" EditText="编辑" UpdateText="更新" ButtonType="Link"  ShowEditButton="true" ShowCancelButton="true"  HeaderStyle-Width="80" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"/>
                </Columns>
                <AlternatingRowStyle CssClass="ARow" />
            </asp:GridView>
            <div id="divPager">
                <asp:Label ID="labNoRecord" Visible="false" runat="server" Text="查询结果为空!"></asp:Label>
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="15" AlwaysShow="True"
                    OnPageChanged="AspNetPager1_PageChanged" ShowCustomInfoSection="Left" CustomInfoSectionWidth="35%"
                    ShowPageIndexBox="always" PageIndexBoxType="DropDownList" CustomInfoHTML="第<font color='red'><b>%currentPageIndex%</b></font>页，共%PageCount%页，每页显示%PageSize%条记录">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
